#ifndef __REPOSITORY__

#define __REPOSITORY__

//#include <lpc11xx.h>
//#include "stm32f4xx.h" 

#define REPO_NAME "Repository one"

#define GOODS_NUM 6

// Goods types; for instance, 0 stands for the type GOODS Apple.

#define APPLE 0

#define BANANA 1

#define PEAR 2

#define KIWI 3

#define MANGO 4

#define PITAYA 5

#define ORANGE 6

void repo_init(void);

typedef struct storage_goods_info
{
	unsigned char goods_type; // Goods type for example: APPLE, BANANA, PEAR, ...
	unsigned int goods_count; // Number of goods of each type.
} __attribute__((packed)) GOODS;

// Repositry info.

typedef struct storage_info
{
	char index[2];
	unsigned char storage_status;  //????
	unsigned char led_status;      //led??  1 ? - 0 ?
	unsigned char buzzer_status;   //????? 1 ?? - 0 ???
	unsigned char fan_status;      //????  1 ? - 0 ??
	unsigned char seg_status;     //???
	signed char x; // A value detected by Sensor MPU6050.
	signed char y; // A value detected by Sensor MPU6050.
	signed char z; // A value detected by Sensor MPU6050.
	float temperature; // The current temperature of curtain reposity.
	float temperatureMIN; // The lowest limit to temperature for curtain reposity.
	float temperatureMAX; // The highest limit to temperature for curtain reposity.
	float humidity; // The current humidity of curtain reposity.
	float humidityMIN; // The lowest limit to humidity for curtain reposity.
	float humidityMAX; // The highest limit to humidity for curtain reposity.
	float illumination; // The strength of lightnss.
	float illuminationMIN; // The lowest limit to strength of lightnss for curtain reposity.
	float illuminationMAX; // The highest limit to strength of lightnss for curtain reposity.
	float battery;      //??
	float adc;          //
	struct storage_goods_info goods_info[GOODS_NUM]; // Goods info for all types of goods.
} __attribute__((packed)) REPO_ENV;


 
#endif
